﻿package part_4_HomeWork;

public class PriorityTest {
	public static void main(String[] args) {
		Priority t=new Priority();
		System.out.println("********显示默认优先级**********");
		System.out.println("主线程名："+Thread.currentThread().getName()+",优先级:"+Thread.currentThread().getPriority());
		System.out.println("子线程名："+t.getName()+",优先级:"+t.getPriority());
		System.out.println("********修改默认优先级**********");
		Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
		t.setPriority(Thread.MIN_PRIORITY);
		System.out.println("主线程名："+Thread.currentThread().getName()+",优先级:"+Thread.currentThread().getPriority());
		System.out.println("子线程名："+t.getName()+",优先级:"+t.getPriority());
	}
}
